#ifndef PROCESS_HPP_INCLUDE
#define PROCESS_HPP_INCLUDE

#include "image.h"
#include "log.h"
#include "config.h"
#include <vector> 

using std::vector;

class Observer;
class States;
class IO;
class Model;

class Process
{
public:
	Process(States *_state, WorkType _type);
	virtual ~Process(){}
	
	void SetIO(IO* _io){io = _io;}
	void SetModel(Model* _model){model = _model;}
	virtual void Attach(Observer* obv);	
	virtual void Detach(Observer* obv);
	void Do(Image &image);
	void Swap(Image &image);
	virtual void ToDo(const Image &image){}
	
	int m_count;
	Image prv_image;
	bool AddFrameFlag;
	
	States *state;
	WorkType w_type;


protected:
	//Image rst_image;
	IO *io;
	Model *model;
	
private:
	vector<Observer*>* _obvs;
};
#endif // PROCESS_HPP_INCLUDE
